package equipment;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 
import address.Addresses;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.OneToMany;
/**
 *
 * @author Killian
 */
@Entity
@Table(name="EQUIPMENT")
public class Equipment implements java.io.Serializable {
    private static final long serialVersionUID = -8757337896773261247L;
 
    private int id_equipment;
    private String name_hardware;
    private String cpu;
    private String ram;
    private String place;
    private String system_ex;
    private Set<Addresses> addresses;

    public Equipment() {
    }  

    public Equipment(int id_equipment, String name_hardware, String cpu, String ram, String place, String system_ex) {
        this.id_equipment = id_equipment;
        this.name_hardware = name_hardware;
        this.cpu = cpu;
        this.ram = ram;
        this.place = place;
        this.system_ex = system_ex;
    }
    
    @Id
    @GeneratedValue
    @Column(name="ID_EQUIPMENT")
    public int getId_equipment() {
        return id_equipment;
    }
    @Column(name="NAME_HARDWARE")
    public String getName_hardware() {
        return name_hardware;
    }
    @Column(name="CPU")
    public String getCpu() {
        return cpu;
    }
    @Column(name="RAM")
    public String getRam() {
        return ram;
    }
    @Column(name="PLACE")
    public String getPlace() {
        return place;
    }   
    @Column(name="SYSTEM_EX")
    public String getSystem_ex() {
        return system_ex;
    }

    public void setId_equipment(int id_equipment) {
        this.id_equipment = id_equipment;
    }

    public void setName_hardware(String name_hardware) {
        this.name_hardware = name_hardware;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public void setRam(String ram) {
        this.ram = ram;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public void setSystem_ex(String system_ex) {
        this.system_ex = system_ex;
    }

    @OneToMany(mappedBy="equipement")
    public Set<Addresses> getAddresses() {
        return addresses;
    }

    public void setAddresses(Set<Addresses> addresses) {
        this.addresses = addresses;
    }    

    @Override
    public String toString() {
        return "Equipement{" + "id_equipment=" + id_equipment + ", name_hardware=" + name_hardware + ", cpu=" + cpu + ", ram=" + ram + ", place=" + place + ", system_ex=" + system_ex + ", addresses=" + addresses + '}';
    }   
}